# -*- coding: utf-8 -*-#
#-------------------------------------------------------------------------------
# 建立者:        潘炎珍  
# Name:         hw02
# Description:
# Author:       98745
# Date:         2019/3/9
#-------------------------------------------------------------------------------

def sortNumbers(*numbers,type='asc'):
    # list=[]
    # for i in numbers:
    #     list.append(i)
    if type=='asc':
        # list.sort()
        return sorted(numbers,reverse=False)
    else:
        # list.sort(reverse=True)
        return sorted(numbers,reverse=True)
    # return list
if __name__ =='__main__':
    x=[5,4,1,7,9]
    print(sortNumbers(*x))
    print(sortNumbers(*x,type='desc'))